<?php /* Smarty version 2.6.26, created on 2010-05-12 11:17:21
         compiled from admin/addBroadcast.tpl */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="webapps/styles/table_dis.css" />
<script type="text/javascript" src="webapps/scripts/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	//添加颜色变化
	$("#tab tr").hover(function(){$(this).css("background","#DEEBFC");},function(){$(this).css("background","#FFF");});
	//进行客户端数据验证
	$("#addBroadcast").submit(function(){
		var category = $("#category").val();
		var title = $(":input#title").val();
		var content = $("#content").val();
		var souce = $("#souce").val();
		
		if(category == "0"){
			alert("请选择上传的视频类别！");
			return false;
		}
		
		if(title == ""){
			alert("标题不能为空！");
			return false;
		}
		
		if(content == ""){
			alert("内容不能为空！");
			return false;
		}
		
		if(souce == ""){
			alert("来源不能为空！");
			return false;
		}
		
		return true;
	});
});
</script>
<title><?php echo $this->_tpl_vars['title']; ?>
</title>
</head>

<body>
<form id="addBroadcast" action="index.php?controller=admin&action=addBroadcastAction" method="post">
<table width="100%" cellpadding="1" cellspacing="1" border="0" id="tab">
  <tr>
    <th colspan="2" style="background-color:#4F9AD0;">添加视频</th>
  </tr>
  <tr>
    <td width="9%">视频类别</td>
    <td width="91%">
        <select id="category" name="category">
        <option value="0">请选择…</option>
        <?php unset($this->_sections['tmp_res_broadcastCategory']);
$this->_sections['tmp_res_broadcastCategory']['name'] = 'tmp_res_broadcastCategory';
$this->_sections['tmp_res_broadcastCategory']['loop'] = is_array($_loop=$this->_tpl_vars['res_broadcastCategory']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['tmp_res_broadcastCategory']['show'] = true;
$this->_sections['tmp_res_broadcastCategory']['max'] = $this->_sections['tmp_res_broadcastCategory']['loop'];
$this->_sections['tmp_res_broadcastCategory']['step'] = 1;
$this->_sections['tmp_res_broadcastCategory']['start'] = $this->_sections['tmp_res_broadcastCategory']['step'] > 0 ? 0 : $this->_sections['tmp_res_broadcastCategory']['loop']-1;
if ($this->_sections['tmp_res_broadcastCategory']['show']) {
    $this->_sections['tmp_res_broadcastCategory']['total'] = $this->_sections['tmp_res_broadcastCategory']['loop'];
    if ($this->_sections['tmp_res_broadcastCategory']['total'] == 0)
        $this->_sections['tmp_res_broadcastCategory']['show'] = false;
} else
    $this->_sections['tmp_res_broadcastCategory']['total'] = 0;
if ($this->_sections['tmp_res_broadcastCategory']['show']):

            for ($this->_sections['tmp_res_broadcastCategory']['index'] = $this->_sections['tmp_res_broadcastCategory']['start'], $this->_sections['tmp_res_broadcastCategory']['iteration'] = 1;
                 $this->_sections['tmp_res_broadcastCategory']['iteration'] <= $this->_sections['tmp_res_broadcastCategory']['total'];
                 $this->_sections['tmp_res_broadcastCategory']['index'] += $this->_sections['tmp_res_broadcastCategory']['step'], $this->_sections['tmp_res_broadcastCategory']['iteration']++):
$this->_sections['tmp_res_broadcastCategory']['rownum'] = $this->_sections['tmp_res_broadcastCategory']['iteration'];
$this->_sections['tmp_res_broadcastCategory']['index_prev'] = $this->_sections['tmp_res_broadcastCategory']['index'] - $this->_sections['tmp_res_broadcastCategory']['step'];
$this->_sections['tmp_res_broadcastCategory']['index_next'] = $this->_sections['tmp_res_broadcastCategory']['index'] + $this->_sections['tmp_res_broadcastCategory']['step'];
$this->_sections['tmp_res_broadcastCategory']['first']      = ($this->_sections['tmp_res_broadcastCategory']['iteration'] == 1);
$this->_sections['tmp_res_broadcastCategory']['last']       = ($this->_sections['tmp_res_broadcastCategory']['iteration'] == $this->_sections['tmp_res_broadcastCategory']['total']);
?>
            <option value="<?php echo $this->_tpl_vars['res_broadcastCategory'][$this->_sections['tmp_res_broadcastCategory']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['res_broadcastCategory'][$this->_sections['tmp_res_broadcastCategory']['index']]['categoryName']; ?>
</option>
        <?php endfor; endif; ?>
        </select> <span style="color:#933;">*类别必须</span>
    
    </td>
  </tr>
  <tr>
    <td width="9%">视频标题</td>
    <td width="91%"><input type="text" id="title" name="title" style="width:240px;" /> 
    <span style="color:#933;">*标题必须</span></td>
  </tr>
  <tr>
    <td width="9%" style="vertical-align:top;">内容简介</td>
    <td width="91%"><textarea id="content" name="content" cols="49" rows="12"></textarea> <span style="color:#933; vertical-align:top;">*内容简介必须</span></td>
  </tr>
  <tr>
    <td width="9%">视频路径</td>
    <td width="91%"><input type="hidden" id="urlPath" name="urlPath" value="<?php echo $this->_tpl_vars['urlPath']; ?>
" /><?php echo $this->_tpl_vars['urlPath']; ?>
</td>
  </tr>
  <tr>
    <td>视频来源</td>
    <td><input type="text" id="souce" name="souce" style="width:240px;" /> <span style="color:#933;">*来源必须</span></td>
  </tr>
  <tr>
    <td colspan="2" style="padding-left:98px;"><input type="submit" name="submit" value="提交" /> <input type="reset" name="reset" value="重置" /></td>
  </tr>
</table>
</form>
</body>
</html>